Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a bot account. #83

Merged
merged 4 commits into from
Jun 3, 2019
Merged

Using a bot account. #83

merged 4 commits into from
Jun 3, 2019

Conversation

crspeller
Copy link
Member

No description provided.

@crspeller crspeller added the 2: Dev Review Requires review by a core committer label Jun 3, 2019
server/api.go Show resolved Hide resolved
server/command.go Outdated Show resolved Hide resolved
server/command.go Show resolved Hide resolved
server/command.go Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
@@ -776,16 +658,16 @@ func (p *Plugin) handleCommentMentionNotification(event *github.IssueCommentEven
continue
}

userID := p.getGitHubToUserIDMapping(username)
if userID == "" {
userId := p.getGitHubToUserIDMapping(username)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think go vet was glitching out.

webapp/package-lock.json Outdated Show resolved Hide resolved
@hanzei
Copy link
Contributor

hanzei commented Jun 3, 2019

Would you also please set "min_server_version": "5.12.0", in the manifest?

@crspeller
Copy link
Member Author

@hanzei Ready for re-review.

Copy link
Member

@jwilander jwilander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lieut-data lieut-data left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One comment below re: non-configurability of username.

server/plugin.go Show resolved Hide resolved
@crspeller crspeller merged commit 132b7c4 into master Jun 3, 2019
@crspeller crspeller deleted the bot-accounts branch June 3, 2019 17:30
@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Jun 3, 2019
@@ -81,13 +85,31 @@ func (p *Plugin) OnActivate() error {
return err
}
p.API.RegisterCommand(getCommand())
user, err := p.API.GetUserByUsername(config.Username)

botId, appErr := p.Helpers.EnsureBot(&model.Bot{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Late catch: This is potential dangerous. EnsureBot returns an error, not *model.AppErr. Because of this the checks later can fail. @crspeller Would you please fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants